<?php
session_start();
include_once('connect.php');
foreach($_SESSION['product'] as $key =>$value){
    $db = new database("SELECT pro_id, pro_name, pro_img, pro_price_sell
                        FROM product
                        WHERE pro_id = ".$value['pro_id']);
    $value2['product']['product'.$key] = $db->render_pro_info();
    $value2['product']['product'.$key]['item0']['num_ses'] = $key;
    $value2['product']['product'.$key]['item0']['num_pro'] = $_SESSION['product'][$key]['num_pro'];
}
    echo json_encode($value2);
?>